// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_CASH_FLOW
// * CreateDate    : 2014-06-05 18:29:48
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:48
// * LastChanger   : 2014-06-05 18:29:48
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class FinCashFlowEntity : EntityBase
    {
        public FinCashFlowTable TableSchema
        {
            get
            {
                return FinCashFlowTable.Current;
            }
		}
		
		public FinCashFlowEntity()
        {

        }
		
		public FinCashFlowEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.CashFlowId = Convert.ToString(CommonFunctions.ToObject(dr["CASH_FLOW_ID"]));
			this.PeronId = Convert.ToString(CommonFunctions.ToObject(dr["PERON_ID"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.CashFlowType = Convert.ToString(CommonFunctions.ToObject(dr["CASH_FLOW_TYPE"]));
			this.AccountsCode = Convert.ToString(CommonFunctions.ToObject(dr["ACCOUNTS_CODE"]));
			this.CashFlowDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CASH_FLOW_DATE"]));
			this.Amount = Convert.ToDecimal(CommonFunctions.ToObject(dr["AMOUNT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
        }
		
		public FinCashFlowEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.CashFlowId = Convert.ToString(CommonFunctions.ToObject(dr["CASH_FLOW_ID"]));
			this.PeronId = Convert.ToString(CommonFunctions.ToObject(dr["PERON_ID"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.CashFlowType = Convert.ToString(CommonFunctions.ToObject(dr["CASH_FLOW_TYPE"]));
			this.AccountsCode = Convert.ToString(CommonFunctions.ToObject(dr["ACCOUNTS_CODE"]));
			this.CashFlowDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CASH_FLOW_DATE"]));
			this.Amount = Convert.ToDecimal(CommonFunctions.ToObject(dr["AMOUNT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinCashFlowTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string CashFlowId
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_CASH_FLOW_ID)); }
            set { SetData(FinCashFlowTable.C_CASH_FLOW_ID, value); }
        }
		
        [DataMember]
        public string PeronId
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_PERON_ID)); }
            set { SetData(FinCashFlowTable.C_PERON_ID, value); }
        }
		
        [DataMember]
        public string Currency
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_CURRENCY)); }
            set { SetData(FinCashFlowTable.C_CURRENCY, value); }
        }
		
        [DataMember]
        public string CashFlowType
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_CASH_FLOW_TYPE)); }
            set { SetData(FinCashFlowTable.C_CASH_FLOW_TYPE, value); }
        }
		
        [DataMember]
        public string AccountsCode
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_ACCOUNTS_CODE)); }
            set { SetData(FinCashFlowTable.C_ACCOUNTS_CODE, value); }
        }
		
        [DataMember]
        public DateTime CashFlowDate
        {
            get { return Convert.ToDateTime(GetData(FinCashFlowTable.C_CASH_FLOW_DATE)); }
            set { SetData(FinCashFlowTable.C_CASH_FLOW_DATE, value); }
        }
		
        [DataMember]
        public decimal Amount
        {
            get { return Convert.ToDecimal(GetData(FinCashFlowTable.C_AMOUNT)); }
            set { SetData(FinCashFlowTable.C_AMOUNT, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_REMARK)); }
            set { SetData(FinCashFlowTable.C_REMARK, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(FinCashFlowTable.C_CREATED_DATE)); }
            set { SetData(FinCashFlowTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_CREATED_BY)); }
            set { SetData(FinCashFlowTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(FinCashFlowTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(FinCashFlowTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        [DataMember]
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(FinCashFlowTable.C_LAST_MODIFIED_BY)); }
            set { SetData(FinCashFlowTable.C_LAST_MODIFIED_BY, value); }
        }
		
		#endregion
	}
	
	
}	

